<%= render :partial => "admin/products/sidebar" %>

<% content_for :head do %>
  <style type="text/css">
    ul.categories {
      margin-left: 10px;
    }
    ul.categories li {
      margin: 4px 0px 4px 15px;
      line-height: 25px;
      width: 200px;
    }
  </style>
<% end %>

<h1>Zařazení výrobku "<%= @product.presentation %>" do kategorií</h1>

<%= form_for @product, :url => admin_product_product_categories_path(params[:product_id]) do |f| %>
  <% CategoryGroup.all.each do |category_group| %>
    <h2><%= category_group.presentation %></h2>
    
    <%= render "categories", :root => category_group.root %>
  <% end %>

  <%= f.submit "#{t 'helpers.submit.product_category.update'}" %>
<% end %>